import 'package:custom_widgets/item_normal_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_ui_demo/page/others/bezier/bezier3_page.dart';
import 'package:flutter_ui_demo/page/others/bot_toast_page.dart';
import 'package:flutter_ui_demo/page/others/firm_but_gentle/firm_but_gentle_page.dart';
import 'package:flutter_ui_demo/page/others/photo_image/overlay_view_demo.dart';
import 'package:flutter_ui_demo/page/others/shimmer_page.dart';
import 'package:flutter_ui_demo/page/others/spinkit_page.dart';
import 'package:flutter_ui_demo/res/strings.dart';

import 'bezier/bezier2_page.dart';
import 'curve_show/sys_curves_page.dart';
import 'drag_back_widget.dart';
import 'gesture_demo.dart';
import 'index_stack_drag_card_demo_page2.dart';
import 'photo_image/image_overlay_view_demo.dart';
import 'photo_image/page_view_demo.dart';
import 'photo_image/photo_view_demo.dart';
import 'photo_image/slide_page_demo.dart';
import 'pie_chart/pie_chart_page.dart';

class OthersPage extends StatefulWidget {
  OthersPage({Key? key}) : super(key: key);

  @override
  _OthersPageState createState() => _OthersPageState();
}

class _OthersPageState extends State<OthersPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(AppStrings.TAB_OTHERS),
        centerTitle: true,
        elevation: 0.5,
      ),
      body: ListView(
        children: <Widget>[
          ItemNormalWidget.item(
            title: "Spinkit",
            onTap: () {
              Navigator.push<dynamic>(
                  context,
                  MaterialPageRoute<dynamic>(
                      builder: (BuildContext context) => SpinkitPage()));
            },
          ),
          ItemNormalWidget.item(
            title: "BotToast",
            onTap: () {
              Navigator.push<dynamic>(
                  context,
                  MaterialPageRoute<dynamic>(
                      builder: (BuildContext context) => BotToastPage()));
            },
          ),
          ItemNormalWidget.item(
            title: "Shimmer-LoadingList",
            onTap: () {
              Navigator.push<dynamic>(
                  context,
                  MaterialPageRoute<dynamic>(
                      builder: (BuildContext context) => LoadingListPage()));
            },
          ),
          ItemNormalWidget.item(
            title: "Shimmer-SlideToUnlock",
            onTap: () {
              Navigator.push<dynamic>(
                  context,
                  MaterialPageRoute<dynamic>(
                      builder: (BuildContext context) => SlideToUnlockPage()));
            },
          ),
          ItemNormalWidget.item(
            title: "bottom_drag测试demo",
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => DragBackWidget()),
              );
            },
          ),
          ItemNormalWidget.item(
            title: "Gesture测试demo",
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => GestureDemo()),
              );
            },
          ),
          ItemNormalWidget.item(
            title: "A draggable card测试Demo",
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(
                    builder: (context) => IndexStackDragCardDemoPage2()),
              );
            },
          ),
          ItemNormalWidget.item(
            title: "SlideImage测试demo",
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => SlidePageDemo()),
              );
            },
          ),
          ItemNormalWidget.item(
            title: "PhotoViewDemo测试demo",
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => PhotoViewDemo()),
              );
            },
          ),
          ItemNormalWidget.item(
            title: "PageViewDemo测试demo",
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => PageViewDemo()),
              );
            },
          ),
          ItemNormalWidget.item(
            title: "OverlayEntry Demo测试demo",
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => OverlayViewDemo()),
              );
            },
          ),
          ItemNormalWidget.item(
            title: "ImageOverlayEntry Demo测试demo",
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => ImageOverlayViewDemo()),
              );
            },
          ),
          ItemNormalWidget.item(
            title: "剑气加载动画",
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => FirmButGentlePage()),
              );
            },
          ),
          ItemNormalWidget.item(
            title: "系统Curves",
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => SysCurvesPage()),
              );
            },
          ),
          ItemNormalWidget.item(
            title: "贝塞尔二次曲线",
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => Bezier2Page()),
              );
            },
          ),
          ItemNormalWidget.item(
            title: "贝塞尔三次曲线",
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => Bezier3Page()),
              );
            },
          ),
          ItemNormalWidget.item(
            title: "饼图",
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => PieChartPage()),
              );
            },
          ),
        ],
      ),
    );
  }
}
